<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>

<h:body>
	<h:form>
		<h:panelGrid columns="2">
			<p:outputLabel value="Digite o CEP: "></p:outputLabel>
			<p:inputText value="#{consultarEnderecoMB.cep}"></p:inputText>
			<p:outputLabel value="Data: "></p:outputLabel>
			<p:calendar value="#{consultarEnderecoMB.dataHoje}"></p:calendar>
		</h:panelGrid>
		<p:commandButton action="#{consultarEnderecoMB.consultarEnderecoCep}"
			value="Consultar"></p:commandButton>
		<h:messages layout="table"></h:messages>
	</h:form>

	<h:panelGrid columns="3" rendered="#{consultarEnderecoMB.endereco.cep!=null}">
			<h3>Endereco</h3>
			<h:outputLabel value="CEP "></h:outputLabel>
			<h:outputLabel value="#{consultarEnderecoMB.endereco.cep}"></h:outputLabel>
			<h3>Data</h3>
			<h:outputLabel value="Data "></h:outputLabel>
			<h:outputLabel value="#{consultarEnderecoMB.dataHoje}"></h:outputLabel>
	</h:panelGrid>
</h:body>
</html>
